package cn.kai.process.flow.node;

import cn.kai.process.flow.core.FlowChain;
import cn.kai.process.flow.core.Node;
import cn.kai.process.flow.core.NodeContext;
import lombok.AllArgsConstructor;

import java.util.List;

/**
 * 链节点
 Author: cKnight
 Date: 2025/1/23
 */
@AllArgsConstructor
public class ChainNode implements Node {
    private FlowChain chain;

    public ChainNode(List<Node> nodes){
        chain = new FlowChain(nodes);
    }
    @Override
    public void execute(NodeContext context) {
        chain.execute(context);
    }
}
